import { gql } from "@apollo/client"


export const SEARCH_USER_ID = gql`
  query User($id: ID!){ 
    user(id: $id) {
      id
      name
      age
      created_at
      updated_at
    }
  }
`;
export const USER_LIST = gql`
  query UserList($limit:Int = 10, $page: Int = 1){
    userList(limit: $limit, page: $page) {
      total,
      data {
        id
        name
        age
        created_at
        updated_at
      }
    }
  }
`;

export const USER_UPDATE_INFO = gql`
  mutation Update($id: ID!, $data: DataInput) {
    updateUserList(id: $id, data: $data) {
      id
      name
      age
      created_at
      updated_at
    }
  }
`
export const USER_ADD_INFO = gql`
  mutation Create($data: DataInput) {
    addUser(data: $data) {
      id
      name
      age
      created_at
      updated_at
    }
  }
`